State level data analysis

In this notebook we will acces data by state, i.e., multiple cities at once.


In [1]:
import pandas as pd
import getpass, os
os.environ['PSQL_USER']='dengueadmin'
os.environ['PSQL_HOST']='localhost'
os.environ['PSQL_DB']='dengue'
os.environ['PSQL_PASSWORD']=getpass.getpass("Enter the database password: ")


Enter the database password: ········

In [2]:
os.chdir('..')
from infodenguepredict.data.infodengue import build_multicity_dataset
%pylab inline


Using TensorFlow backend.
Populating the interactive namespace from numpy and matplotlib

In [3]:
dataset = build_multicity_dataset('Ceará')


Out[3]:
SE_2300101 SE_2300150 SE_2300200 SE_2300309 SE_2300408 SE_2300507 SE_2300606 SE_2300705 SE_2300754 SE_2300804 ... municipio_nome_2313500 municipio_nome_2313559 municipio_nome_2313609 municipio_nome_2313708 municipio_nome_2313757 municipio_nome_2313807 municipio_nome_2313906 municipio_nome_2313955 municipio_nome_2314003 municipio_nome_2314102
data_iniSE
2010-01-03 201001 201001 201001 201001 201001 201001 201001 201001 201001 201001 ... None None None None None None None None None None
2010-01-10 201002 201002 201002 201002 201002 201002 201002 201002 201002 201002 ... None None None None None None None None None None
2010-01-17 201003 201003 201003 201003 201003 201003 201003 201003 201003 201003 ... None None None None None None None None None None
2010-01-24 201004 201004 201004 201004 201004 201004 201004 201004 201004 201004 ... None None None None None None None None None None
2010-01-31 201005 201005 201005 201005 201005 201005 201005 201005 201005 201005 ... None None None None None None None None None None

5 rows × 2024 columns


In [10]:
dataset.head()


Out[10]:
SE_2300101 SE_2300150 SE_2300200 SE_2300309 SE_2300408 SE_2300507 SE_2300606 SE_2300705 SE_2300754 SE_2300804 ... municipio_nome_2313500 municipio_nome_2313559 municipio_nome_2313609 municipio_nome_2313708 municipio_nome_2313757 municipio_nome_2313807 municipio_nome_2313906 municipio_nome_2313955 municipio_nome_2314003 municipio_nome_2314102
data_iniSE
2010-01-03 201001 201001 201001 201001 201001 201001 201001 201001 201001 201001 ... None None None None None None None None None None
2010-01-10 201002 201002 201002 201002 201002 201002 201002 201002 201002 201002 ... None None None None None None None None None None
2010-01-17 201003 201003 201003 201003 201003 201003 201003 201003 201003 201003 ... None None None None None None None None None None
2010-01-24 201004 201004 201004 201004 201004 201004 201004 201004 201004 201004 ... None None None None None None None None None None
2010-01-31 201005 201005 201005 201005 201005 201005 201005 201005 201005 201005 ... None None None None None None None None None None

5 rows × 2024 columns


In [12]:
casos = dataset[[c for c in dataset.columns if c.startswith('casos_est') ]]
casos.plot(legend=False);



In [ ]:


In [ ]: